<%@ Page Language="C#" MasterPageFile="~/admin.master" AutoEventWireup="true" CodeFile="PaymentConfiguration.aspx.cs" Inherits="Admin_PaymentConfiguration" Title="Payment Configuration" %>

<%@ Register Src="../Modules/ResultMessage.ascx" TagName="ResultMessage" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="AdminPlaceHolder" Runat="Server">
<atlas:ScriptManager runat="server" EnablePartialRendering="true" EnableScriptComponents="true" ID="scriptManager">
</atlas:ScriptManager >
    <atlas:UpdateProgress ID="uProgress" runat="server">
        <ProgressTemplate>
        <div class="loadingbox">
            <img src="../images/spinner.gif" align="absmiddle"/>&nbsp;&nbsp;Processing...
        </div>
        </ProgressTemplate>
     </atlas:UpdateProgress> 
<div id="centercontent">
<h4>Payment Configuration</h4>
<p >Here is the place where you can determine how you want your checkout process to work. There are a number of scenarios
to think about, and we'll do our best to help you as needed! First and foremost is security - what makes the 
most sense for you and your business? Many times this means letting someone else handle the transaction. Next is
impression - if you feel that it reflects poorly to send the customer to another site to finish the transaction,
then there are some decisions you'll need to make in order to setup a payment plan (and often this involves
more money on your part).</p>
<p >
    The recommended setup is to allow your users to checkout in as many ways as possible. Give them the choice,
    and tell them why you are doing so. Many customers like to know they can checkout using Google and PayPal,
    and they also like to know that they can use their credit card safely.</p>
<p ><strong>
    General Settings
    </strong>
    </p>
    <atlas:UpdatePanel ID="WizUpdatePanel" runat="server" Mode="Conditional" >
    <ContentTemplate>    

    <table>

        <tr>
            <td >
    Your Site's Currency</td>
            <td class="adminitem">
    <asp:DropDownList ID="ddlCurrencyType" runat="server">
    </asp:DropDownList></td>
        </tr>
        <tr>
            <td >
                Login Requirements</td>
            <td class="adminitem"><asp:DropDownList ID="ddlLogin" runat="server">
                <asp:ListItem Selected="True" Value="checkout">At Checkout</asp:ListItem>
                <asp:ListItem Value="basket">When Adding to Basket</asp:ListItem>
                <asp:ListItem Value="never">Never - Anonymous Shopping</asp:ListItem>
            </asp:DropDownList></td>
        </tr>
        <tr>
            <td>
                <asp:Button ID="btnSetGeneral" runat="server" Text="Set" OnClick="btnSetGeneral_Click" CssClass="frmbutton" /></td>
            <td>
                <uc1:ResultMessage ID="ResultMessage1" runat="server" />
                </td>
        </tr>
    </table>
    <br />
<div class="sectionheader">Optional Checkout: Use PayPal</div><br />
 <div class="sectionoutline">
   <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_wp-standard-overview-outside" target="_blank"></a><img src="../images/paypal_logo.gif" />
   <div >
    PayPal offers two ways to allow users to purchase your goods through their site.
    They are:<br />
    <ul>
        <li>
    PayPal Payments Standard<br />
        </li>
        <li>PayPal PaymentsPro ExpressCheckout</li></ul>
    <br />
    Each transaction service charges a small amount per transaction - usually about
    1%.
    <br />
    <br />
    <strong>
    Payments Standard is the low-cost alternative.</strong> Your shopper is sent to PayPal where
    they complete the transaction; PayPal then sends your website
    (in this case the CSK) information back about the transaction. The CSK logs this
    info when the buyer returns from PayPal and records the transaction.<br />
    <br />
    <strong>PaymentsPro ExpressCheckout is much the same, but the buyer is sent to PayPal
        only to Authorize the sale</strong>. They are returned to your site to make
    the actual purchase. This is a step up from Standard since the transaction happens
    on your site.<br />
    <br />
    Standard is the easiest to setup, but is the most vulnerable to failure since the
    sale is not purely transactional. In other words, money changes hands at another
    site, and your site is told about it after the fact. This can cause issues with
    inventory if the sale is not immediate, as well as if your site goes down.<br />
    <br />
    PaymentsPro is only available for US-based companies at this time.<br />
    <br />
    To setup Payments Standard, you must:<br />
    <ol>
        <li><a href="http://www.paypal.com">Create a PayPal Account (it's free)<br />
        </a></li>
        <li>Validate your email and Verify your account using a Bank Account or Credit Card<br />
        </li>
        <li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=p/xcl/rec/pdt-techview-outside">
            Setup your PDT<br />
        </a></li>
        <li>Enter the Settings Below</li></ol>
    <br />
    <br />
    <strong>PayPal Standard Settings<br />
        <br />
    </strong>
    </div>
   <table>
        <tr>
            <td >
                Use Payments Standard</td>
            <td class="adminitem">
                <asp:CheckBox ID="chkUsePPStandard" runat="server" /></td>
        </tr>
        <tr>
            <td >
                Use Sandbox</td>
            <td class="adminitem">
                <asp:CheckBox ID="chkUsePPStandardSandbox" runat="server" /></td>
        </tr>
        <tr>
            <td >
                Business Email
            </td>
            <td class="adminitem">
                <asp:TextBox ID="txtBusinessEmail" runat="server" Width="171px"></asp:TextBox><br />
                This is the email address of your PayPal business account</td>
        </tr>
        <tr>
            <td >
                PDT ID</td>
            <td class="adminitem">
                <asp:TextBox ID="txtPDTID" runat="server" Width="413px"></asp:TextBox><br />
                The PDT is PayPal's "Payment Data Transfer" system. When you sign up with PayPal,
                you need to setup the PDT in order for PayPal to notify the CSK when a payment has
                been made. When you do this, PayPal gives you an ID number - place this here.</td>
        </tr>
        <tr>
            <td style="width: 147px">
                <asp:Button ID="btnSetPPStandard" runat="server" Text="Set" OnClick="btnSetPPStandard_Click" CssClass="frmbutton"/></td>
            <td style="width: 391px">
                <uc1:ResultMessage ID="ResultMessage2" runat="server" />
            </td>
        </tr>
    </table>
    <br />
    <div >
    To setup PaymentsPro, you must live in the United States and apply via email or
    phone. PayPal will muse over your website and then let you know if you qualify.
    Getting started is pretty simple:<br />
    <ol>
        <li>Create a PayPal Account<br />
        </li>
        <li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_onboarding-list-pro&getStarted=true">
            Sign up for PaymentsPro<br />
        </a></li>
        <li><a href="../readme.htm">Follow the README and setup your PFX certificate<br />
        </a></li>
        <li>Enter your settings below.</li></ol>
    
    <b>PayPal PaymentsPro Settings</b><br />
    <br />
		</div>
    <table>
        <tr>
            <td >
                Use Payments Pro (Express Checkout)</td>
            <td class="adminitem" style="width: 315px">
                <asp:CheckBox ID="chkUsePPPro" runat="server" /></td>
        </tr>
        <tr>
            <td  >
                Use Sandbox</td>
            <td class="adminitem" style="width: 315px">
                <asp:CheckBox ID="chkUsePPSandbox" runat="server" /></td>
        </tr>
        <tr>
            <td  >
                API Account Name</td>
            <td class="adminitem" style="width: 315px">
                <asp:TextBox ID="txtPPAPIAccount" runat="server" Width="200px"></asp:TextBox><br />
                should be something like "email_api.domain.com"</td>
        </tr>
        <tr>
            <td  >
                API Account Password</td>
            <td class="adminitem" style="width: 315px">
                <asp:TextBox ID="txtPPAPIPassword" runat="server" Width="199px"></asp:TextBox><br />
                whatever password you specified when applying for PaymentsPro</td>
        </tr>
        <tr>
            <td  >
                Certificate Name</td>
            <td class="adminitem" style="width: 315px">
                <asp:TextBox ID="txtPPCertName" runat="server" Width="197px"></asp:TextBox><br />
                This cetificate should be located in the App_Data directory, and end with ".PFX"</td>
        </tr>
        <tr>
            <td  >
                Certificate Password</td>
            <td class="adminitem" style="width: 315px">
                <asp:TextBox ID="txtPPCertPassword" runat="server"></asp:TextBox><br />
                This is the password you entered when you created your SSL certificate with OpenSSL.</td>
        </tr>
        <tr>
            <td >
                <asp:Button ID="btnSetPPPro" runat="server" Text="Set" OnClick="btnSetPPPro_Click" CssClass="frmbutton"/></td>
            <td style="width: 315px">
                <uc1:ResultMessage ID="ResultMessage3" runat="server" />
            </td>
        </tr>
    </table>
</div>


    <br />
<div class="sectionheader">Payment Provider: Setup Credit Card Checkout Through The Site</div><br />
<div class="sectionoutline">
    <img src="../images/ccs.gif" />
    <br />
    <div >
    Most online merchants want to be able to accept credit cards through their website. This is made
    fairly easy these days by companies such as Authorize.NET, PayPal, and Verisign offering cheap and easy
    integration. 
    
    To accept credit cards through the site, you can use one of our pre-installed Gateway providers, or your 
    developer can create another provider pretty easily. To accept credit cards through the CSK, you must:<br />
    <br />
    <ol>
        <li>Create an account with the gateway of your choice<br />
        </li>
        <li>If not part of our provider list here, create your own payment provider<br />
        </li>
        <li>Enter the information below</li></ol>
    <strong>Credit Card Settings<br />
    </strong>
    <br />
    </div>
    <table>
        <tr>
            <td >
                Accept Credit Cards</td>
            <td class="adminitem">
                <asp:CheckBox ID="chkAcceptCC" runat="server" /></td>
        </tr>
        <tr>
            <td >
                Gateway Provider</td>
            <td class="adminitem">
                <asp:DropDownList ID="ddlCCProvider" runat="server">
                    <asp:ListItem Value="AuthorizeNetPaymentProvider">Authorize.NET</asp:ListItem>
                    <asp:ListItem Selected="True" Value="PayPalPaymentProvider">PayPal DirectPay</asp:ListItem>
                </asp:DropDownList><br />
                Note: If you select PayPal DirectPay, you don't need to add the information below;
                you will however need to set the PaymentsPro settings above as DirectPay is part
                of PaymentsPro</td>
        </tr>
        <tr>
            <td >
                Username</td>
            <td class="adminitem">
                <asp:TextBox ID="txtCCUserName" runat="server"></asp:TextBox><br />
                The username to access the gateway</td>
        </tr>
        <tr>
            <td >
                Password</td>
            <td class="adminitem">
                <asp:TextBox ID="txtCCPassword" runat="server"></asp:TextBox><br />
                The password to access the gateway</td>
        </tr>
        <tr>
            <td >
                Key</td>
            <td class="adminitem">
                <asp:TextBox ID="txtCCKey" runat="server"></asp:TextBox><br />
                Sometimes you are given an access key for a given gateway</td>
        </tr>
        <tr>
            <td >
                Server URL</td>
            <td class="adminitem">
                <asp:TextBox ID="txtCCUrl" runat="server" Width="411px"></asp:TextBox><br />
                The access URL</td>
        </tr>
        <tr>
            <td>
                <asp:Button ID="btnSetCC" runat="server" Text="Set" OnClick="btnSetCC_Click" CssClass="frmbutton" /></td>
            <td>
                <uc1:ResultMessage ID="ResultMessage5" runat="server" />
            </td>
        </tr>
    </table>
 </div>
    <br />
<br />


</div>
</ContentTemplate>
</atlas:UpdatePanel>
    <div>
    </div>
    </ContentTemplate> </atlas:UpdatePanel>
    <div>
    </div>
</asp:Content>

